//
//  CelloneTab5.m
//  project-A (pianke)
//
//  Created by dllo on 16/1/26.
//  Copyright © 2016年 scott. All rights reserved.
//

#import "CelloneTab5.h"
#import <DKNightVersion.h>
@implementation CelloneTab5

-(void)dealloc{
    [_labelcount release];
    [_labellei release];
    [_labelneirong release];
    [_labelpiccount release];
    [_labeltitle release];
    
    [_image1 release];
    [_image2 release];
    [_image3 release];
    [_zan release];
    
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatview];
    }
    return self;
}
-(void)creatview{
    self.labelcount = [[UILabel alloc]init];
    [self.contentView addSubview:self.labelcount];
    self.labelcount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    [self.labelcount release];
    
    self.labellei = [[UILabel alloc]init];
    [self.contentView addSubview:self.labellei];
     self.labellei.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
        [self.labellei release];
    
    self.labelneirong = [[UILabel alloc]init];
    [self.contentView addSubview:self.labelneirong];
   
     self.labelneirong.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    [self.labelneirong release];
    
    
   
    
    self.labeltitle = [[UILabel alloc]init];
    [self.contentView addSubview:self.labeltitle];
   self.labeltitle.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    [self.labeltitle release];
    
    self.image1 = [[UIImageView alloc]init];
 
    [self.contentView addSubview:self.image1];
    [self.image1 release];
    
    self.image2 = [[UIImageView alloc]init];
    
    [self.contentView addSubview:self.image2];
    [self.image2 release];
    
    self.image3 = [[UIImageView alloc]init];
       [self.contentView addSubview:self.image3];
    [self.image3 release];
    
    self.zan = [[UIImageView alloc]init];
    self.zan.image = [UIImage imageNamed:@"xin"];
    [self.contentView addSubview:self.zan];
    [self.zan release];
    
    self.labelpiccount = [[UILabel alloc]init];
    [self.contentView addSubview:self.labelpiccount];
    
     self.labelpiccount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
       [self.labelpiccount release];
}

-(void)layoutSubviews{
    
    [super layoutSubviews];
    CGFloat width = self.contentView.frame.size.width;
    self.labellei.frame = CGRectMake(20, 20, width - 40, 15);
    
    self.image1.frame = CGRectMake(20, 50, width - 40, (width - 40) * 0.5);
    
    self.image2.frame = CGRectMake(20, (width - 40) * 0.5 + 50 + 5, (width - 45) / 2.0f, (width - 40) * 0.5);
    
    self.image3.frame = CGRectMake(25 + (width - 45) / 2.0f, (width - 40) * 0.5 + 55, (width - 45) / 2.0f, (width - 40) * 0.5);
    
    self.labeltitle.frame = CGRectMake(20, width + 30,
 (width - 40) , 30);
    
    self.labelneirong.frame = CGRectMake(20, width + 75, width - 40, 50);
    
    self.zan.frame = CGRectMake(width - 100, 145 +width, 20, 20);
    
    self.labelcount.frame = CGRectMake(width - 70, 145 +width, 40, 20);
    
    self.labelpiccount.frame = CGRectMake(width - 50, 25 +
                                          (width - 40), 20, 20);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
